import request from '/@/utils/request';

export function getDevList(params?: Object) {
  return request({
    url: '/bum/regdev/page',
    method: 'get',
    params
  })
} 
//查询未注册的设备
export function getUnRegisterDevList(params?: Object) {
  return request({
    url: '/bum/regdev/unRegisterDev',
    method: 'get', 
    params
  })
} 
//新增
export function addDevList(params?: Object) {
  return request({
    url: '/bum/regdev',
    method: 'post',
    data: params
  })
}
//批量新增
export function batchAddDevList(params?: Object) {
  return request({
    url: '/admin/regdev/saveBatchRegDev',
    method: 'post',
    data: params
  })
}

//修改
export function editDevList(params?: Object) {
  return request({
    url: '/bum/regdev',
    method: 'put',
    data: params
  })
} 
//删除
export function delDevList(ids?: Object) {
  return request({
    url: '/bum/regdev',
    method: 'delete',
    data: ids,
  })
}  
//计量类型字典
export function getEnergyType() {
  return request({
    url: '/admin/dict/type/energy_type',
    method: 'get', 
  })
}